<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>查看照片</title>
    <link rel="stylesheet" href="/plugins/layui/css/layui.css" media="all">
    <link rel="stylesheet" href="css/album_photo.css">
</head>
<body class="layui-layout-body">
<div class="layui-layout layui-layout-admin layui-bg-blue">
    <!-- 头部区域 -->
    <div th:replace="index::topbar"></div>

    <!-- 左侧导航区域 -->
    <div th:replace="index::sidebar"></div>

    <!-- 底部固定区域 -->
    <div th:replace="index::bottombar"></div>

    <!-- 内容主体区域 -->
    <div class="layui-body">

        <div class="album-topic">
            <p th:text="${league.leagueName}+的相册">联赛名称</p>
        </div>

        <ul class="photo-list">
            <div th:each="photo:${photoModel.photoList}">
                <li style="float: left">
                    <div class="img-block">
                        <!--<img id="test" th:src="@{${photo.staticPath}}" class="img-style">-->
                        <a th:href="@{${photo.staticPath}}" id="demo"><img id="test" th:src="@{${photo.staticPath}}" class="img-style"></a>
                    </div>
                    <h5 th:text="${photo.uploadDate}">上传日期</h5>
                </li>
            </div>
        </ul>
        <!--</div>-->

        <!--分页-->
        <!--<div id="page"></div>-->
    </div>
</div>

<!-- 修改密码弹窗 -->
<script type="text/html" id="pswModel1">
    <div id="pswModel" th:replace="index::changePsw">
    </div>
</script>

</body>

<script src="/plugins/layui/layui.js"></script>
<script type="text/javascript" src="/js/jquery.js"></script>

<script th:inline="javascript">
    /*var staticPath=[[${session.staticPath}]];*/
    /*alert(staticPath);*/
    /*var staticPath=$('#test')[0].src;
    $("#demo").attr("href",$('#test')[0].src);*/
</script>

<script>
    /*alert($('#test')[0].src);*/
    /*$("#demo").attr("href",$('#test')[0].src);*/

    /*$('a.light-toggle').lightbox({
        image: $('#test')[0].src,
        caption: '图片说明'
    });*/

    //表单事件
    layui.use('form', function(){
        var form = layui.form;

        //各种基于事件的操作，下面会有进一步介绍
    });

    //点击事件
    layui.use('element', function(){
        var element = layui.element;

    });

    //分页事件
    layui.use(['laypage','layer'],function () {
        var laypage=layui.laypage,
            layer=layui.layer;

        //总页数低于页码总数
        laypage.render({
            elem: 'page'
            ,count: 18      //数据总数
            ,jump: function (obj,first) {
                if(!first){
                    layer.msg('第'+obj.curr+'页');
                }
            }
        });
    });


    //显示个人信息
    function info() {
        layui.use(['layer'], function(){
            var layer = layui.layer;
            layer.open({
                type:1,
                title:'个人信息',
                area:'350px',
                offset:'120px',
                content:'<ul style="padding:25px 35px 8px 35px;">' +
                '<li>用户名：[[${session.loginUser}]]</li>'+
                '<li>联系方式：[[${session.tel}]]</li>'+
                '</ul>',
                btn:['确定'],
                btnAlign:'center'
            });
        });
    }

    //修改密码
    function changePassword() {
        layui.use(['layer'],function () {
            var layer=layui.layer;
            layer.open({
                type: 1,
                title: "修改密码",
                area: '400px',
                offset: '120px',
                content: $("#pswModel1").html()
            });
        })
    }
</script>
</html>